import React from 'react'
import { Route, Switch, Redirect } from 'react-router-dom'
import LoadableComponent from '../../utils/LoadableComponent'


//参数一定要是函数，否则不会懒加载，只会代码拆分

// 道闸-项目详情
const BarrierGateDetail = LoadableComponent(() => import('../../module/dataCentre/barrierGateDetail/barrierGateDetail'))//数据中心-道闸-右侧
const weightDetail = LoadableComponent(() => import('../../module/dataCentre/weightDetail/weightDetail'))//数据中心-道闸-右侧
const VehicleBlackListDetail = LoadableComponent(() => import('../../module/dataCentre/VehicleBlackListDetail/VehicleBlackListDetail'))//数据中心-道闸-右侧
const VehicleWhiteListDetail = LoadableComponent(() => import('../../module/dataCentre/VehicleWhiteListDetail/VehicleWhiteListDetail'))//数据中心-道闸-右侧
// 配置中心-项目配置
const ProgramConfigDetail = LoadableComponent(() => import('../../module/hardwareCenter/programConfigDetail/programConfigDetail'))//数据中心-道闸-右侧


const HardwareConfigDetail = LoadableComponent(() => import('../../module/hardwareCenter/hardwareConfigDetail/hardwareConfigDetail'))//数据中心-道闸-右侧
const AddNewPro1 = LoadableComponent(() => import('../../module/hardwareCenter/newProgress/newProgress'))//数据中心-项目配置-新建项目
const AddNewPro2 = LoadableComponent(() => import('../../module/hardwareCenter/newProgress2/newProgress2'))
const AddNewPro3 = LoadableComponent(() => import('../../module/hardwareCenter/newProgress3/newProgress3'))
// 设备列表-设备列表
const DeviceListDetail = LoadableComponent(() => import('../../module/deviceLibrary/deviceListDetail/deviceListDetail'))
// 设备列表-设备详情
const DeviceInfo = LoadableComponent(() => import('../../module/deviceLibrary/deviceInfo/deviceInfo'))
const deviceBrandDetail = LoadableComponent(() => import('../../module/deviceLibrary/deviceBrandDetail/deviceBrandDetail/deviceBrandDetail'))
class BarrierGate extends React.Component {
   
    render () {
        return (
            <Switch>
                
                {/* 道闸-项目详情 */}
                <Route exact path="/barrierGateDetail" component={BarrierGateDetail} />
                {/* {称重数据-项目详情} */}
                <Route exact path="/weightDetail" component={weightDetail} />
                {/* {车辆黑名单} */}
                <Route exact path="/VehicleBlackListDetail" component={VehicleBlackListDetail} />
                {/* {车辆白名单} */}
                <Route exact path="/VehicleWhiteListDetail" component={VehicleWhiteListDetail} />
                
                {/* 项目配置 */}
                <Route exact path="/programConfigDetail" component={ProgramConfigDetail} />
                {/* 由我的申报审批跳转过来的详情页 */}
              
                {/* 硬件配置 */}
                <Route exact path="/hardwareConfigDetail" component={HardwareConfigDetail} />
                {/* 新建项目-步骤1 */}
                <Route exact path="/addNewPro1" component={AddNewPro1} />
                {/* 新建项目-步骤2 */}
                <Route exact path="/addNewPro2" component={AddNewPro2} />
                {/* 新建项目-步骤2 */}
                <Route exact path="/addNewPro3" component={AddNewPro3} />

                {/* 设备列表 */}
                <Route exact path="/deviceListDetail" component={DeviceListDetail} />
                {/* 设备详情 */}
                <Route exact path="/deviceInfo" component={DeviceInfo} />

                <Route exact path='/deviceBrandDetail' component = {deviceBrandDetail} />
            </Switch>
        )
    }
}

export default BarrierGate

